<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
<title>应急广播平台</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="../../plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link href="../common/css/eb-common.css" rel="stylesheet">
<link href="../system/css/user.css" rel="stylesheet">
</head>
<body >
<div class="main-container container-fluid" id="rrapp" >
	<div class="main-content">
		<div class="page-content" >

			<div style="padding-bottom: 60px;">
				<div class="pull-left">
					<button v-if="permissions['sys:user:add']" class="eb-btn-operation"  @click="add()"/><i class="fa fa-save"></i>&nbsp;新增用户</button>
				</div>

				<div class="pull-right">
					<form id="form-search-curve" class="form-inline" action="javascript:void(0);" >
						<div class="form-group">
							<div class="input-group input-group-sm">
								<label class="control-label eb-label-text">账户</label>
								<input  class="input-date eb-input"  v-model="req.account"/>
							</div>
						</div>

						<div class="form-group">
							<div class="input-group input-group-sm">
								<label class="control-label eb-label-text">姓名</label>
								<input  class="input-date eb-input"  v-model="req.userName"/>
							</div>
						</div>

						<div class="form-group">
							<div class="input-group input-group-sm styled-select" >
								<label class="control-label eb-label-text">状态</label>
								<select  class="eb-select" v-model="req.status">
									<option value="" >全部</option>
									<div v-if="pageEnum != null">
										<option v-for="p in pageEnum" v-if="p.dictGroupCode == 'USER_STATE_DICT'" v-bind:value="p.dictKey">{{p.dictValue}}</option>
									</div>
								</select>
							</div>
						</div>

						<!--<div class="form-group">
							<div class="input-group input-group-sm styled-select" >
								<label class="control-label eb-label-text">已删除用户</label>
								<select  class="eb-select" v-model="req.deleteFlag">
									<option value="0" >不列出</option>
									<option value="" >列出</option>
								</select>
							</div>
						</div>-->


						<div class="form-group">
							<div class="input-group input-group-sm">
								<button class="eb-btn-search" type="button" onclick="reload()">
									<i class="fa fa-search"></i> &nbsp; 查 询
								</button>
							</div>
						</div>

					</form>
				</div>
			</div>

			<div class="jqGridDiv">
				<div class="jqGridDiv2" >
					<table id="jqGrid"></table>
					<div id="jqGridPager" class="jqGridPager"></div>
				</div>
			</div>
		</div>
	</div>

	<div  id="userLayer" style="display: none;" class="eb-layer" >
		<div class="eb-layer-title">
			{{title}}
		</div>
		<form class="form-horizontal m-t" id="user_form" method="post" v-if="userAddShow">
			<input type="hidden" id="userId" name="userId" value="">
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>用户账号：</label>
				<div class="col-sm-7">
					<input id="username" v-model="userInfo.account" class="form-control eb-input-text" type="text" value="" placeholder="6~30位字母、数字、下划线" minlength="6" maxlength="30">
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>用户密码：</label>
				<div class="col-sm-7">
					<input id="password1" v-model="userInfo.password"  class="form-control eb-input-text" type="password" value="" placeholder="6~30位字母、数字、下划线" minlength="6" maxlength="30">
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>密码确认：</label>
				<div class="col-sm-7">
					<input id="password2"  v-model="userInfo.password2" class="form-control eb-input-text" type="password" value="" placeholder="6~30位字母、数字、下划线" maxlength="30" minlength="6">
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>真实姓名：</label>
				<div class="col-sm-7">
					<input id="realName" v-model="userInfo.userName" class="form-control eb-input-text" value="" placeholder="请输入您的真实姓名" maxlength="255" />
				</div>
			</div>
			<div class="form-group mg-h-30" style="text-align: center">
				<button class="eb-btn-search" type="button" @click="closeLayer()">
					<i class="fa fa-close"></i> &nbsp; 取消
				</button>

				<button class="eb-btn-search" type="button" @click="save">
					<i class="fa fa-check"></i> &nbsp; 确认
				</button>
			</div>
		</form>
		<form class="form-horizontal m-t"  method="post" v-if="userUpdateShow">
			<input type="hidden"  v-model="userInfo.userId" value="">
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>用户账号：</label>
				<div class="col-sm-7">
					<input  v-model="userInfo.account" disabled class="form-control eb-input-text" type="text" value="" maxlength="30"/>
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>真实姓名：</label>
				<div class="col-sm-7">
					<input  v-model="userInfo.userName" class="form-control eb-input-text" value="" maxlength="255" />
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-4 control-label eb-label-text"><span class="e-required"> *</span>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：</label>
				<div class="col-sm-7">
					<select  class="eb-select" v-model="userInfo.status">
						<option value="" >全部</option>
						<div v-if="pageEnum != null">
							<option v-for="p in pageEnum" v-if="p.dictGroupCode == 'USER_STATE_DICT'" v-bind:value="p.dictKey">{{p.dictValue}}</option>
						</div>
					</select>
				</div>
			</div>
			<div class="form-group mg-h-30" style="text-align: center">
				<button class="eb-btn-search" type="button" @click="closeLayer()">
					<i class="fa fa-close"></i> &nbsp; 取消
				</button>

				<button class="eb-btn-search" type="button" @click="update(false)">
					<i class="fa fa-check"></i> &nbsp; 确认
				</button>
			</div>
		</form>
	</div>

	<div  id="userRoleLayer" style="display: none;" class="eb-layer" >
		<div class="eb-layer-title">
			{{title}}
		</div>
		<form class="form-horizontal m-t" id="user_role_form" method="post" >
			<input type="hidden"  v-model="userInfo.userId" value="">
			<div class="form-group mg-h-30">
				<label class="col-sm-3 control-label eb-label-text"><span class="e-required"> *</span>用户账号：</label>
				<div class="col-sm-8">
					<span    class="form-control " style="line-height: 25px;border: 0;color: #00ffff;background: none;" >{{userInfo.account}}</span>
				</div>
			</div>
			<div class="form-group mg-h-30">
				<label class="col-sm-3 control-label eb-label-text"><span class="e-required"> *</span>选择角色：</label>
				<div class="col-sm-8">
					<ul id="role_choose_ul">
						<li v-for="role in roles">
							<span class="span-checkbox">
								<input  type="checkbox"  name="roleId" v-bind:value="role.id" v-model="roleIds" />
								<span class="span-checkbox-name" style="color: #00ffff" :title="role.name">
										{{role.name | filterFun}}
								</span>
							</span>
						</li>
					</ul>
				</div>
			</div>
			<div class="form-group mg-h-30">
				<div class="col-sm-6 control-label eb-label-text">
					<input type="button"  class="eb-btn-search" value="保存" @click="saveUserRoleBatch()">
				</div>
				<div class="col-sm-5">
					<input type="button"  class="eb-btn-search" @click="closeLayer()" value="返回">
				</div>
			</div>
		</form>

	</div>
</div>

<script src="../../plugins/jquery/jquery.min.js"></script>
<script src="../../plugins/vue/vue.js"></script>
<script src="../../plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../plugins/laydate/laydate.js"></script>
<script src="../../js/common.js"></script>
<script src="js/user.js"></script>
</body>
</html>